package itsm.isperp.module.entity.bpm.act;

import itsm.isperp.framework.domain.IBean;

import java.sql.Timestamp;
import java.util.Date;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.activiti.engine.task.DelegationState;
import org.activiti.engine.task.Task;

/**
 * 
 * 
 * 
 * @author lizx
 * @date 2013-7-11
 * 
 */
@Entity
@Table(name = "act_ru_task")
public class ActRuTask implements Task, IBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	String id;

	@Column
	int rev;

	@Column
	String executionId;

	@Column
	String procInstId;

	@Column
	String procDefId;

	@Column
	String name;

	@Column
	String parentTaskId;

	@Column
	String description;

	@Column
	String taskDefKey;

	@Column
	String owner;

	@Column
	String assignee;

	@Column
	String delegation;

	@Column
	int priority;

	@Column
	Timestamp createTime;

	@Column
	Date dueDate;
	@Column
	String category;

	@Column
	int suspensionState;

	@Column
	String tenantId;

	@Column
	String formKey;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getRev() {
		return rev;
	}

	public void setRev(int rev) {
		this.rev = rev;
	}

	public String getExecutionId() {
		return executionId;
	}

	public void setExecutionId(String executionId) {
		this.executionId = executionId;
	}

	public String getProcInstId() {
		return procInstId;
	}

	public void setProcInstId(String procInstId) {
		this.procInstId = procInstId;
	}

	public String getProcDefId() {
		return procDefId;
	}

	public void setProcDefId(String procDefId) {
		this.procDefId = procDefId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getParentTaskId() {
		return parentTaskId;
	}

	public void setParentTaskId(String parentTaskId) {
		this.parentTaskId = parentTaskId;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getTaskDefKey() {
		return taskDefKey;
	}

	public void setTaskDefKey(String taskDefKey) {
		this.taskDefKey = taskDefKey;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public String getAssignee() {
		return assignee;
	}

	public void setAssignee(String assignee) {
		this.assignee = assignee;
	}

	public String getDelegation() {
		return delegation;
	}

	public void setDelegation(String delegation) {
		this.delegation = delegation;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	public Date getDueDate() {
		return dueDate;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	public int getSuspensionState() {
		return suspensionState;
	}

	public void setSuspensionState(int suspensionState) {
		this.suspensionState = suspensionState;
	}

	public String getTenantId() {
		return tenantId;
	}

	public void setTenantId(String tenantId) {
		this.tenantId = tenantId;
	}

	public String getFormKey() {
		return formKey;
	}

	public void setFormKey(String formKey) {
		this.formKey = formKey;
	}

	@Override
	public DelegationState getDelegationState() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setDelegationState(DelegationState delegationState) {
		// TODO Auto-generated method stub

	}

	@Override
	public String getProcessInstanceId() {

		return procInstId;
	}

	@Override
	public String getProcessDefinitionId() {

		return procDefId;
	}

	@Override
	public String getTaskDefinitionKey() {

		return taskDefKey;
	}

	@Override
	public String getCategory() {
		return category;
	}

	@Override
	public void setCategory(String category) {
		this.category = category;
	}

	@Override
	public void delegate(String userId) {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean isSuspended() {
		return this.suspensionState == 0;
	}

	@Override
	public Map<String, Object> getTaskLocalVariables() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Map<String, Object> getProcessVariables() {
		// TODO Auto-generated method stub
		return null;
	}

}
